{%- extends "basic/layout.html" %}

{% block extrahead %}

{{ super() }}
<link rel="stylesheet" href="{{ pathto('_static/custom.css', 1) }}" type="text/css" />

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TGRQK1JJYD"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-TGRQK1JJYD');
</script> 

<div id="topBanner" class="modal">
  <div class="modal-content">
    <div class="modal-header" style="background-color: rgb(255, 240, 129); text-align:center;">
      <i>🎺 Announcement from Marc 🎺</i>
      <br>
      <!--
      I'm leading a new education-oriented open-source project called <a target="_blank" href="https://iqengine.org">IQEngine</a>!<br>It's a web-based SDR toolkit for analyzing, processing, and sharing RF recordings.  Checkout out our <a target="_blank" href="https://github.com/IQEngine/IQEngine">GitHub</a> and <a target="_blank" href="https://discord.gg/k7C8kp3b76">Discord</a>
      //-->
      PySDR now has a Patreon! <a target="_blank" href="https://www.patreon.com/pysdr">Support the project</a> and have your name added to the textbook on the bottom left of every page, plus get priority when emailing questions!
      <div class="closeButton">
        <span style="font-size:30px; position:absolute; top:0px; right:5px; cursor:pointer; ">&times;</span>
      </div>
    </div>
  </div>
</div>

<script>
  var banner = document.getElementById("topBanner");
  var closeButton = document.getElementsByClassName("closeButton")[0];
  // Close banner if they have already clicked the close button in the past
  if (localStorage.getItem('pysdrvisited2')){
    banner.style.display = "none";
  }
  // When they click the close button
  closeButton.onclick = function() {
    banner.style.display = "none";
    localStorage.setItem('pysdrvisited2', true);
  }
</script>

<div style="float: right; padding-bottom: 0;">
  <!-- GitHub Logo //-->
  <a href="https://github.com/777arc/PySDR" target="_blank" style="text-decoration:none;">
    <svg height="18px" width="18px">
        <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
    </svg>
  </a>

  <!-- Patreon orange (old) Logo //-->
  <a href="https://www.patreon.com/PySDR" target="_blank" style="text-decoration:none;">
    <svg width="18px" height="18px" viewBox="0 0 550 550">
      <g transform="translate(-78.58618,-210.44369)">
        <path style="fill:#ff5900;fill-opacity:1;stroke:none" d="m 349.30488,210.44369 c -149.51545,0 -270.7187,121.20325 -270.7187,270.71875 l 0,270.4687 259.375,0 c 3.7608,0.155 7.5448,0.25 11.3437,0.25 149.5155,0 270.7188,-121.2032 270.7188,-270.7187 0,-149.5155 -121.2033,-270.71875 -270.7188,-270.71875 z" />
        <path style="fill:#ffffff;fill-opacity:1;stroke:none" d="m 349.30493,273.28744 c -114.80003,0 -207.875,93.07494 -207.875,207.875 l 0,123.90625 0,83.75 0,62.8125 83.1875,0 0,-270.25 c 0,-68.64109 55.64016,-124.3125 124.28125,-124.3125 68.64109,0 124.28125,55.67141 124.28125,124.3125 0,68.64109 -55.64016,124.28125 -124.28125,124.28125 -25.09566,0 -48.463,-7.45836 -68,-20.25 l 0,89.34375 c 13.09042,8.05513 42.97659,13.74429 78.03125,14.03125 110.32856,-5.03362 198.25,-96.05383 198.25,-207.625 0,-114.80006 -93.07493,-207.875 -207.875,-207.875 z m -8.71875,415.53125 c 2.8876,0.1191 5.80191,0.21875 8.71875,0.21875 3.07049,0 6.11821,-0.087 9.15625,-0.21875 l -17.875,0 z" />
      </g>
    </svg>
  </a>

  &nbsp;|&nbsp;

  PySDR is now available in:&nbsp;&nbsp;
  <img src="https://pysdr.org/_static/us.svg" alt="English Version" width="20"><a href="https://pysdr.org/index.html">English</a>&nbsp;&nbsp;
  <img src="https://pysdr.org/_static/nl.svg" alt="Dutch Version" width="20"><a href="https://pysdr.org/nl/index-nl.html">Dutch</a>&nbsp;&nbsp;
  <img src="https://pysdr.org/_static/fr.svg" alt="French Version" width="20"><a href="https://pysdr.org/fr/index-fr.html">French</a>&nbsp;&nbsp;
  <img src="https://pysdr.org/_static/ukrain.svg" alt="Ukrainian Version" width="20"><a href="https://pysdr.org/ukraine/index-ukraine.html">Ukrainian</a>
  <img src="https://pysdr.org/_static/cn.svg" alt="Chinese Version" width="20"><a href="https://pysdr.org/zh/index-zh.html">Chinese</a>
</div>
{% endblock %}


{# top+bottom related navs; we also have our own in sidebar #}
{%- macro rellink_markup() %}
  <nav id="rellinks">
    <ul>
      {%- if prev %}
        <li>
          &larr;
          <a href="{{ prev.link|e }}" title="Previous document">{{ prev.title }}</a>
        </li>
      {%- endif %}
      {%- if next %}
        <li>
          <a href="{{ next.link|e }}" title="Next document">{{ next.title }}</a>
          &rarr;
        </li>
      {%- endif %}
    </ul>
  </nav>
{%- endmacro %}

{%- set theme_show_relbar_top = theme_show_relbar_top or theme_show_relbars %}
{%- set theme_show_relbar_bottom = theme_show_relbar_bottom or theme_show_relbars %}

{# removed existing top+bottom related nav, and embed in main content #}
{%- block relbar1 %}{% endblock %}
{%- block relbar2 %}{% endblock %}

{# Nav should appear before content, not after #}
{%- block content %}
{%- if theme_fixed_sidebar|lower == 'true' %}
  <div class="document">
    {{ sidebar() }}
    {%- block document %}
      <div class="documentwrapper">
      {%- if render_sidebar %}
        <div class="bodywrapper">
      {%- endif %}

          {%- block relbar_top %}
            {%- if theme_show_relbar_top|tobool %}
              <div class="related top">
                &nbsp;
                {{- rellink_markup () }}
              </div>
            {%- endif %}
          {% endblock %}

          <div class="body" role="main">
            {% block body %} {% endblock %}
          </div>

          {%- block relbar_bottom %}
            {%- if theme_show_relbar_bottom|tobool %}
              <div class="related bottom">
                &nbsp;
                {{- rellink_markup () }}
              </div>
            {%- endif %}
          {% endblock %}

      {%- if render_sidebar %}
        </div>
      {%- endif %}
      </div>
    {%- endblock %}
    <div class="clearer"></div>
  </div>
{%- else %}
{{ super() }}
{%- endif %}
{%- endblock %}

{%- block footer %}
    <div class="footer">
      {% if show_copyright %}&#169;{{ copyright }}.{% endif %}

      {%- if show_source and has_source and sourcename %}
      {% if show_copyright or show_sphinx %}|{% endif %}
      <a href="{{ pathto('_sources/' + sourcename, true)|e }}"
          rel="nofollow">{{ _('Page source') }}</a>
      {%- endif %}
    
      <br />
      This work is licensed under a
      <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">
        Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
        <br />
        <img alt="Creative Commons License" width="90px" src="https://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" />
      </a>
  </div>

{%- endblock %}
